<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace AlibabaCloud\Client\Credentials;

class RsaKeyPairCredential implements CredentialsInterface
{
    private $publicKeyId;
    private $privateKey;
    public function __construct($publicKeyId, $privateKeyFile)
    {
        \AlibabaCloud\Client\Filter\CredentialFilter::publicKeyId($publicKeyId);
        \AlibabaCloud\Client\Filter\CredentialFilter::privateKeyFile($privateKeyFile);
        $this->publicKeyId = $publicKeyId;
        try {
            $this->privateKey = file_get_contents($privateKeyFile);
        } catch (\Exception $exception) {
            throw new \AlibabaCloud\Client\Exception\ClientException($exception->getMessage(), \AlibabaCloud\Client\SDK::INVALID_CREDENTIAL);
        }
    }
    public function getPrivateKey()
    {
        return $this->privateKey;
    }
    public function getPublicKeyId()
    {
        return $this->publicKeyId;
    }
    public function __toString()
    {
        return "publicKeyId#" . $this->publicKeyId;
    }
}

?>